#if 1
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
#include "UDS14229.h"
#include "UDSReleaseExe.h"
#include "UDSManager.h"
#include "UDS14229ReleaseExe_10.h"
#include "UDS14229ReleaseExe_19.h"

int main()
{
/********模块启动*******/
    UDS14229* mUDS14229 = NULL;
    UDS14229ReleaseExe_10* mUDSReleaseExe10 = NULL;
    UDS14229ReleaseExe_19* mUDSReleaseExe19 = NULL;
    UDSManager* mastor = NULL;
    mUDS14229 = new UDS14229();

    /******用于测试响应*****/
	canUDSMessage mcanUDSMessage;
	mcanUDSMessage.did = 0x50;
	memcpy(mcanUDSMessage.data,"12345",8);    //接收ECU应答信息
    mUDS14229->setDID(mcanUDSMessage.did);
    mUDS14229->setData(mcanUDSMessage.data);
    /**********************/

    mUDSReleaseExe10 = new UDS14229ReleaseExe_10(mUDS14229);
    mUDSReleaseExe19 = new UDS14229ReleaseExe_19(mUDS14229);
    mastor = new UDSManager();

    mastor->setlistudsDID(mUDSReleaseExe10);
    mastor->setlistudsDID(mUDSReleaseExe19);

   // mastor->commitUDSDID();

    /****发送10服务进入编程模式****/
	mUDS14229->UDS14229Client10();
	/****判断超时重发服务******/
	/*if(mUDS14229->getServiceTimeOutFlag("UDS14229ReleaseExe_10")){
		mUDS14229->UDS14229Client10();
	}*/
    mastor->looper();
    return 0;
}
#endif
